<html>
    <head>
        <title>Admin</title>
        <meta charset="utf-8"></meta>
    </head>
    <body>
        <div class="news"><?php
            include_once("feedParser.php");
            include_once("manageBase.php");
            if (!isset($_GET["add"]))
            {
        ?>
        <p>Ajouter un flux </p>
        <form action="admin.php?add=1" method="post">
            <p><input type="text" name="urlFeed" /></p>
            <p><input type="submit" name="submit" /></p>
        </form>
        <?php
            }
            else
            {
                if (isset($_POST["urlFeed"]))
                {
                    $newFeed = new feedParser($_POST["urlFeed"]);
                    addAllNews($newFeed->listItems);
                }
                ?>
                <a href="index.php">Retour à l'index</a>
        <?php
            }
        ?>
            </div>
    </body>
</html>